/**
 * Copyright (C) 2025 pony working team
 * SPDX-License-Identifier: MulanPSL-2.0
 */

#include <stdio.h>

#include <hal_gpio.h>
#include <k_task.h>

int main(void)
{
    /*
     * main task created for you, please add your code here
     *
     * NOTE: the arguments used to create this task
     *
     *  +------------+----------------------+---------+
     *  | attribute  | kconfig entry name   | default |
     *  +------------+----------------------+---------+
     *  | priority   | MAIN_TASK_PRIO       | 20      |
     *  | stack size | MAIN_TASK_STACK_SIZE | 0x800   |
     *  | options    | MAIN_TASK_OPTIONS    | 0       |
     *  +------------+----------------------+---------+
     *
     * you can change them by using the project tool (`prj -s` or `prj -m`)
     *
     * of cause, you can do your initialization here and just let this task
     * return, and this task will be terminated
     */
    hal_gpio_t io = {0};
    io.gpio = SYM_C2N(F);
    io.pin = 6;
    io.mode = HAL_GPIO_MODE_OUTPUT_PP;
    io.speed = HAL_GPIO_SPEED_FREQ_HIGH;

    hal_gpio_init(&io);

    printf("hello pony :-)\n");

    while (1) {
        hal_gpio_toggle(&io);
        task_msleep(1000);
    }

    return 0;
}
